package com.xuecheng.content.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xuecheng.api.content.model.dto.TeachplanDTO;
import com.xuecheng.api.content.model.dto.TeachplanMediaDTO;
import com.xuecheng.content.entity.Teachplan;

/**
 * <p>
 * 课程计划 服务类
 * </p>
 *
 * @author 杨佳畅
 * @since 2022-03-28
 */
public interface TeachplanService extends IService<Teachplan> {

    /**
     * 课程计划树形结构查询
     *
     * @param courseId
     * @param companyId
     * @return
     */
    TeachplanDTO queryTreeNodes(Long courseId, Long companyId);

    /**
     * 新增或修改课程计划
     *
     * @param dto
     * @return
     */
    TeachplanDTO createOrModifyTeachplan(TeachplanDTO dto, Long companyId);

    /**
     * 删除课程计划
     *
     * @param teachPlanId 课程计划ID
     * @param companyId   机构ID
     */
    void removeTeachPlan(Long teachPlanId, Long companyId);

    /**
     * 课程计划绑定媒资信息
     *
     * @param dto
     * @param companyId
     * @return
     */
    TeachplanMediaDTO associateMedia(TeachplanMediaDTO dto, Long companyId);

}
